package com.boot.application.controller;

import com.boot.application.bean.Car;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Date 2021/6/18 15:00
 * @Created by wangle
 * @Description
 */
//@Controller
//@ResponseBody
    @RestController //等于上面两个的合体
public class mycontroller {

        @Autowired
        private Car car;
        @RequestMapping("/car2")
        public  Car getCar(){
            return car;
        }

    @RequestMapping("/hello")
    public  String handle1(){
        return  "hello boot!";

    }



}
